﻿@attribute [XTabPageAttribute("Formulary")]
@page "/form"
<div class="row mb-2">
    <div class="col-12">
        <div class="form-group">
            <label>Just an example</label>
            <input class="form-control" placeholder="type anything...">
        </div>
    </div>
</div>

<div class="row">
    <div class="col-12">
        <div class="form-group">
            <label>Type Anything</label>
            <input class="form-control" placeholder="type anything...">
        </div>
    </div>
</div>

<div class="row">
    <div class="col-12">
        <button class="btn btn-primary" @onclick="ButtonCloseTabAsync">Close Tab</button>
    </div>
</div>


@code {
    [CascadingParameter]
    public XTabs XTabs { get; set; }

    private Task ButtonCloseTabAsync()
       => XTabs.CloseTabByTitleAsync("Formulary");
}